package com.project.fiveCerealsSavoury.service;

import java.util.List;

import com.project.fiveCerealsSavoury.domain.Goods;
import com.project.fiveCerealsSavoury.exception.BizException;
import com.project.fiveCerealsSavoury.transfer.Page;
import com.project.fiveCerealsSavoury.transfer.UserPage;

public interface GoodsService {
	/**
	 * 添加商品
	 */
	public Goods add(Goods goods)throws BizException;
	/**
	 * 修改商品信息价格
	 */
	public boolean amend(Integer id,String newGoodName,Double newPrice,Double newNowPrice,Integer newCount,Double newWeight)throws BizException;
	/**
	 * 删除商品
	 */
	public boolean remove(Integer id)throws BizException;
	/**
	 * 模糊查询
	 */
	public List<Goods> queryAll(String goodName)throws BizException ;
	/**
	 * 分页
	 */
	public Page list(UserPage userPage);
	/**
	 * 根据id查询
	 */
	public Goods query(Integer id)throws BizException;
	/**
	 *减库存 
	 */
	public int stocks(String goodName,Integer count)throws BizException;
	/**
	 * 查询所有的
	 */
	public List<Goods> que();
	/**
	 * 根据商品名查询
	 */
	public List<Goods> queryss(String goodName)throws BizException;
}